﻿<UserControl
             xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
             xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
             xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006" 
             xmlns:d="http://schemas.microsoft.com/expression/blend/2008"  xmlns:VMDS_GUIClient_ViewModels="clr-namespace:VMDS.GUIClient.Views.Management.Storages" xmlns:ViewModels="clr-namespace:VMDS.GUIClient.ViewModels" xmlns:VMDS_GUIClient_ViewModels_Management_Storages="clr-namespace:VMDS.GUIClient.ViewModels.Management.Storages" x:Class="VMDS.GUIClient.Views.Management.Storages.AddStorageDialog"
             x:Name="root"
             mc:Ignorable="d" 
             d:DesignHeight="345" d:DesignWidth="576" Loaded="root_Loaded" IsVisibleChanged="root_IsVisibleChanged" >
	<UserControl.Resources>
		<ResourceDictionary>
			<ResourceDictionary.MergedDictionaries>
				<ResourceDictionary Source="/VMDS.GUIClient;component/Views/ResourceDictionary1.xaml"/>
			</ResourceDictionary.MergedDictionaries>
			<BooleanToVisibilityConverter x:Key="BooleanToVisibilityConverter"/>
		</ResourceDictionary>
	</UserControl.Resources>
	<UserControl.Visibility>
		<Binding Converter="{StaticResource BooleanToVisibilityConverter}" Path="Visible"/>
	</UserControl.Visibility>
	<UserControl.DataContext>
		<VMDS_GUIClient_ViewModels_Management_Storages:AddStorageDialogViewModel/>
	</UserControl.DataContext>
    <Grid Margin="0,1,0,-1">
        <Border Background="#90000000" Visibility="{Binding Visibility}">
        	            
            <Border BorderBrush="Black" BorderThickness="1" Background="AliceBlue" 
                        CornerRadius="10,0,10,0" VerticalAlignment="Center"
                       HorizontalAlignment="Center" Height="200.664" Width="239.647">
                
               
                
            	<Border.DataContext>
            		<VMDS_GUIClient_ViewModels_Management_Storages:AddStorageDialogViewModel/>
            	</Border.DataContext>
                
               
                
                <Grid Margin="10">
                    
                    <Grid.RowDefinitions>
                        
                        <RowDefinition />
                        
                        <RowDefinition Height="Auto" MinHeight="52.96" />
                        
                    </Grid.RowDefinitions>
                    <ProgressBar x:Name="progressBar" Height="19.6" Margin="8,0" Grid.Row="1" VerticalAlignment="Top" IsIndeterminate="True" Visibility="{Binding ProgressVisible, Converter={StaticResource BooleanToVisibilityConverter}}"/>
                    <StackPanel Margin="0" Grid.Row="1" VerticalAlignment="Bottom" HorizontalAlignment="Center">
                    	<StackPanel Margin="0" Orientation="Horizontal">
                    		<Button x:Name="OkButton"  Content="Добавить" Margin="0,0,46.99,0" Style="{DynamicResource GreenButton}" Height="27.333" FontSize="13.333" FontWeight="Bold" Width="76.346" Command="{Binding Add, Mode=OneWay}" Click="OkButton_Click"  />
                    		<Button x:Name="CancelButton"  Content="Отмена" Margin="0" Style="{DynamicResource GreenButton}" Height="27.333" FontSize="13.333" FontWeight="Bold" Width="71.978" Visibility="{Binding CancelButton, Converter={StaticResource BooleanToVisibilityConverter}}" Click="CancelButton_Click" />
                    	</StackPanel>
                    </StackPanel>
                    <TextBox x:Name="NameBox" Height="24" Margin="8,18.2,8,0" TextWrapping="Wrap" Text="{Binding StName, Mode=TwoWay, UpdateSourceTrigger=PropertyChanged}" VerticalAlignment="Top"/>
                    <TextBox x:Name="PathBox" Margin="8,60.2,8,0" TextWrapping="Wrap" Text="{Binding StPath, Mode=TwoWay, UpdateSourceTrigger=PropertyChanged}" Height="24.77" VerticalAlignment="Top"/>
                    <TextBlock Height="21.627" Margin="0" Grid.Row="1" TextWrapping="Wrap" Text="Добавление" VerticalAlignment="Top" HorizontalAlignment="Center" Background="{x:Null}" Visibility="{Binding Visibility, ElementName=progressBar}"/>
                    <TextBlock Height="21.627" Margin="8,2,0,0" TextWrapping="Wrap" VerticalAlignment="Top" HorizontalAlignment="Left" Background="{x:Null}"><Run Language="ru-ru" Text="Название"/></TextBlock>
                    <TextBlock Margin="8,43.2,0,0" TextWrapping="Wrap" HorizontalAlignment="Left" Background="{x:Null}" Text="Путь в формате \\host\share" Height="20.475" VerticalAlignment="Top"/>
                    <Button x:Name="BrowseButton"  Content="Обзор..." Margin="0,0,11.167,16.872" Style="{DynamicResource GreenButton}" Height="18.461" FontSize="13.333" FontWeight="Bold" Width="71.978" Grid.Column="0" HorizontalAlignment="Right" Grid.Row="0" VerticalAlignment="Bottom" Click="BrowseButton_Click" />
                    <TextBlock Margin="8,-12.872,0,0" TextWrapping="Wrap" HorizontalAlignment="Left" Background="{x:Null}" Text="{Binding ValidationMessage}" Height="32.472" VerticalAlignment="Top" Grid.Row="1" Width="201.647" d:LayoutOverrides="VerticalAlignment" Foreground="#FFF70707"/>
                    
                </Grid>
                
            </Border>
            
        </Border>
        
    </Grid>

</UserControl>
